package com.app.buss.ui;

import android.os.Bundle;
import android.text.TextUtils;
import android.widget.EditText;

import com.app.buss.R;
import com.app.buss.base.BaseActivity;
import com.app.buss.mvp.presenter.MainPresenter;
import com.app.buss.mvp.view.IMainView;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class FeedBackActivity extends BaseActivity<MainPresenter> implements IMainView {


    @BindView(R.id.et_feedback)
    EditText etFeedback;

    @Override
    protected MainPresenter createPresenter() {
        return new MainPresenter(this);
    }

    @Override
    protected int bindContent() {
        return R.layout.aty_feedback;
    }

    @Override
    protected void initSome() {
        initToolBar("Feedback");
    }

    @Override
    public void getDataSuccess(Object model) {
    }

    @Override
    public void getDataFail(String msg) {
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }

    @OnClick(R.id.tv_submit)
    public void onViewClicked() {
        if(TextUtils.isEmpty(etFeedback.getText().toString())){
            toastShow("Feedback is empty!");
        }else {
            toastShow("Successful!");
            finish();
        }
    }
}
